Skip to main content

Appointment Creation

In MediKIT, appointments are represented by the Appointment resource.

In order to create an appointment, the following data needs to be collected beforehand:

  • The practitioner's ID
  • The appointment type
  • The appointment start and end times

Free slots

Available appointmentt slots can be retrieved through the Slot resource. While all available slots can be retrieved without any additional input, it is possible and recommended to filter the up-front so as to only retrieve slots the patient might be interested in. Available filters are:

  • service-category
    The category of the service to retrieve slots for.
  • start
    Retrieve only slots for which the start time matches the given value.
  • schedule
    The ID of the schedule to retrieve slots for.

Schedules

Schedules indicate when healthcare professionals are available for specific types of appointments. Schedules can be retrieved through the Schedule resource. Available filters are:

  • service-category
    The category of the service to retrieve schedules for.
  • date
    Retrieve only schedules for which the date matches the given value.

Creating an Appointment

The creation of an appointment is done through a custom FHIR operation on the Appointment resource. Data should be POSTed to endpoint, the body of which should be a Parameters resource containing the following parameters:

  • start
    The start time of the appointment.
  • schedule
    A Reference to the schedule to create the appointment in.
  • create-as-appproved [Optional, default false]
    If set to true, the appointment will be created as booked, if false, the appointment will be created as proposed.
  • comment [Optional]
    A comment from the patient to be added to the appointment.

Appointment Updates from Patient

MediKIT allows for patients to update their attendance at an appointment. Currently, the only update available for patients is to cancel their attendance. This is done by POSTing an AppointmentResponse resource to the Appointment resource:

POST <TENANT_BASE_URL>/fhir/R4/Patient/<PATIENT_ID>/AppointmentResponse

{
"appointment": {"reference": "Appointment/<APPOINTMENT_ID>"},
"actor": {"reference": "Patient/<PATIENT_ID>"},
"participantStatus": "declined"
}

Updates from Practice

The practice can also update the appointment (either to booked from proposed, or to cancelled from booked or proposed). For this purpose, the patient-facing application should expose an API endpoint where AppointmentResponse resources can be POSTed. The request body should be similar to the one for updates from the patient, but with the following differences:

  • The actor should be the practitioner's ID.
  • The participantStatus can be accepted or declined.